module.exports = {
  data: function () {
    return {
      user: '',
      cart: {
        num: '0'
      }
    }
  },
  created: function () {
    let self = this
    if (localStorage.token) {
      self.$set('user.name', localStorage.userName)
      self.$set('cart.num', localStorage.cartUum)
    } else {
    }
  },
  methods: {
    collapse: function () {
      this.cart.num = ++this.cart.num
    }
  }
}
